
/* start /web-platform/scripts/web-platform/ssg/mini-feed.js*/
window.DGC=window.DGC||{};window.DGC.MiniFeed=(function(){'use strict';function process(_options){const options=_.extend({sort:'desc',filterNoFeed:true,baseUrl:window.location.origin,shareType:(item,type)=>`feed_${ type }_item`},_options);if(!Array.isArray(options.data)){throw new TypeError('Missing data to process');}
const sortFunctions={asc:function(arr){return arr.sort(function(a,b){return a.timestamp.getTime()-b.timestamp.getTime();});},desc:function(arr){return arr.sort(function(a,b){return b.timestamp.getTime()-a.timestamp.getTime();});},};const values=options.data.filter(function(o){return o.start_date_epoch!==undefined||o.value!==undefined;}).map(function(o){return(o.value!==undefined&&o.start_date_epoch===undefined)?o.value:o;});const cleaned=values.map(function(d){if(options.filterNoFeed&&Array.isArray(d.subtypeArray)&&d.subtypeArray.indexOf('no-feed')>0){return false;}
let url,shareUrl,shareType,image,className;switch(d.type){case'global_newscast':url=`/news/${ d.pageName }`;shareUrl=`${ options.baseUrl }${ url }`;shareType=options.shareType(d,'news');image=d.poster||d.thumbnail;className='news';break;case'wgt_guide':url=`/guides/${ d.pageName }`;shareUrl=`${ options.baseUrl }${ url }`;shareType=options.shareType(d,'guide');image=d.poster||d.thumbnail;className='guide';break;case'wgt_update_notes':url=`/update-notes/${ d.pageName }`;shareUrl=`${ options.baseUrl }${ url }`;shareType=options.shareType(d,'update_notes');image=d.poster||d.thumbnail;className='update-notes';break;case'wgt_article':url=d.link;shareUrl=url;shareType=options.shareType(d,'linkout');image=d.image||d.thumb;className='news';break;case'youtube-widget':url=`https://youtube.com/watch?v=${ d['query-string'] }`;shareUrl=url;shareType=options.shareType(d,'youtube');image=d.thumb;className='youtube';break;}
return _.extend({},d,{timestamp:new Date(parseInt(d.start_date_epoch,10)*1000),url,shareUrl,shareType,image,className,isYouTube:d.type==='youtube-widget',isExternal:d.type==='wgt_article'||d.type==='youtube-widget'});});const filtered=cleaned.filter(function(d){return(typeof d==='object')&&(d.locale.slice(0,2)===globs.soelocale.slice(0,2))&&(!options.minDate||d.timestamp.getTime()>=options.minDate)&&(!options.maxDate||d.timestamp.getTime()<options.maxDate);});const sorted=Object.hasOwnProperty.call(sortFunctions,options.sort)&&typeof sortFunctions[options.sort]==='function'?sortFunctions[options.sort](filtered):filtered;const sliced=typeof options.limit==='number'?sorted.slice(0,options.limit):sorted;return sliced;}
function init(options){if(!Array.isArray(options.data)){throw new TypeError('Missing data to process');}
if(typeof options.template!=='function'){throw new TypeError('Template must be a function');}
if(typeof options.target!=='string'){throw new TypeError('Target must be a string selector');}
const processed=process(options);const templated=processed.map(options.template);const markup=templated.join('');$(options.target).html(markup);}
return{init:init,process:process};}());

/* end /web-platform/scripts/web-platform/ssg/mini-feed.js*/

/* start /scripts/ssg/_pages/home.js*/
SOE.Feeds=SOE.Feeds||{};SOE.Feeds.filterAffixFn=function(){'use strict';return $('#siteNavSpacer').height();};$(document).ready(function(){'use strict';function toggleSiteNavSize(){try{const isAtTop=window.pageYOffset<window.innerHeight/4;document.getElementById('siteNavDesktop').classList.toggle('big',isAtTop);}catch(e){}}
const scrollUpdater=new DebouncedUpdater({callbacks:[toggleSiteNavSize]});$(window).on('scroll resize',scrollUpdater.doUpdate.bind(scrollUpdater));if(SOE.Feed){SOE.Feed.setRenderer(SOE.Feeds.flatListRenderer);}
$('.feed-container .feed-filters').html($('#feedFiltersTemplate').html());$('.feed-container .feed-load-more').html($('#feedLoadMoreTemplate').html());const initialFeedStyle=wpCookie('feed-view-type');$('#feedContainer, #feedFilterBar').toggleClass('rows',initialFeedStyle==='rows').toggleClass('cards',initialFeedStyle!=='rows');$('#feedViewToggle').on('click',function(){const nextFeedStyle=$('#feedContainer').hasClass('rows')?'cards':'rows';wpCookie('feed-view-type',nextFeedStyle);$('#feedContainer, #feedFilterBar').toggleClass('rows',nextFeedStyle==='rows').toggleClass('cards',nextFeedStyle==='cards');});if(window.DGC&&window.DGC.MiniFeed&&window.SSG&&window.SSG.home&&Array.isArray(window.SSG.home.featured)){window.DGC.MiniFeed.init({data:window.SSG.home.featured,template:_.template($('#featuredItemTemplate').html(),null,{variable:'data'}),target:'#featured',limit:3,sort:false,filterNoFeed:false,shareType:(item,type)=>`featured_${ type }_item`});}});

/* end /scripts/ssg/_pages/home.js*/

/* start /web-platform/scripts/libs/jquery/plugins/jquery.touchSwipe-1.6.19.min.js*/
/*!
 * @fileOverview TouchSwipe - jQuery Plugin
 * @version 1.6.18
 *
 * @author Matt Bryson http://www.github.com/mattbryson
 * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
 * @see http://labs.rampinteractive.co.uk/touchSwipe/
 * @see http://plugins.jquery.com/project/touchSwipe
 * @license
 * Copyright (c) 2010-2015 Matt Bryson
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 */
!function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function($){"use strict";function init(options){return!options||void 0!==options.allowPageScroll||void 0===options.swipe&&void 0===options.swipeStatus||(options.allowPageScroll=NONE),void 0!==options.click&&void 0===options.tap&&(options.tap=options.click),options||(options={}),options=$.extend({},$.fn.swipe.defaults,options),this.each(function(){var $this=$(this),plugin=$this.data(PLUGIN_NS);plugin||(plugin=new TouchSwipe(this,options),$this.data(PLUGIN_NS,plugin))})}function TouchSwipe(element,options){function touchStart(jqEvent){if(!(getTouchInProgress()||$(jqEvent.target).closest(options.excludedElements,$element).length>0)){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(!event.pointerType||"mouse"!=event.pointerType||0!=options.fallbackToMouseEvents){var ret,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),validateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.cancelable!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.off(START_EV,touchStart),$element.off(CANCEL_EV,touchCancel),$element.off(MOVE_EV,touchMove),$element.off(END_EV,touchEnd),LEAVE_EV&&$element.off(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&&currentPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null!==options.pinchThreshold?pinchDistance>=options.pinchThreshold:!0}function validateSwipeTime(){var result;return result=options.maxTimeThreshold?!(duration>=options.maxTimeThreshold):!0}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distance<options.threshold)}function validateLongTap(){return duration>options.longTapThreshold&&DOUBLE_TAP_THRESHOLD>distance}function didTap(){return!(!validateTap()||!hasTap())}function didDoubleTap(){return!(!validateDoubleTap()||!hasDoubleTap())}function didLongTap(){return!(!validateLongTap()||!hasLongTap())}function startMultiFingerRelease(event){previousTouchEndTime=getTimeStamp(),fingerCountAtRelease=event.touches.length+1}function cancelMultiFingerRelease(){previousTouchEndTime=0,fingerCountAtRelease=0}function inMultiFingerRelease(){var withinThreshold=!1;if(previousTouchEndTime){var diff=getTimeStamp()-previousTouchEndTime;diff<=options.fingerReleaseThreshold&&(withinThreshold=!0)}return withinThreshold}function getTouchInProgress(){return!($element.data(PLUGIN_NS+"_intouch")!==!0)}function setTouchInProgress(val){$element&&(val===!0?($element.on(MOVE_EV,touchMove),$element.on(END_EV,touchEnd),LEAVE_EV&&$element.on(LEAVE_EV,touchLeave)):($element.off(MOVE_EV,touchMove,!1),$element.off(END_EV,touchEnd,!1),LEAVE_EV&&$element.off(LEAVE_EV,touchLeave,!1)),$element.data(PLUGIN_NS+"_intouch",val===!0))}function createFingerData(id,evt){var f={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return f.start.x=f.last.x=f.end.x=evt.pageX||evt.clientX,f.start.y=f.last.y=f.end.y=evt.pageY||evt.clientY,fingerData[id]=f,f}function updateFingerData(evt){var id=void 0!==evt.identifier?evt.identifier:0,f=getFingerData(id);return null===f&&(f=createFingerData(id,evt)),f.last.x=f.end.x,f.last.y=f.end.y,f.end.x=evt.pageX||evt.clientX,f.end.y=evt.pageY||evt.clientY,f}function getFingerData(id){return fingerData[id]||null}function setMaxDistance(direction,distance){direction!=NONE&&(distance=Math.max(distance,getMaxDistance(direction)),maximumsMap[direction].distance=distance)}function getMaxDistance(direction){return maximumsMap[direction]?maximumsMap[direction].distance:void 0}function createMaximumsData(){var maxData={};return maxData[LEFT]=createMaximumVO(LEFT),maxData[RIGHT]=createMaximumVO(RIGHT),maxData[UP]=createMaximumVO(UP),maxData[DOWN]=createMaximumVO(DOWN),maxData}function createMaximumVO(dir){return{direction:dir,distance:0}}function calculateDuration(){return endTime-startTime}function calculateTouchesDistance(startPoint,endPoint){var diffX=Math.abs(startPoint.x-endPoint.x),diffY=Math.abs(startPoint.y-endPoint.y);return Math.round(Math.sqrt(diffX*diffX+diffY*diffY))}function calculatePinchZoom(startDistance,endDistance){var percent=endDistance/startDistance*1;return percent.toFixed(2)}function calculatePinchDirection(){return 1>pinchZoom?OUT:IN}function calculateDistance(startPoint,endPoint){return Math.round(Math.sqrt(Math.pow(endPoint.x-startPoint.x,2)+Math.pow(endPoint.y-startPoint.y,2)))}function calculateAngle(startPoint,endPoint){var x=startPoint.x-endPoint.x,y=endPoint.y-startPoint.y,r=Math.atan2(y,x),angle=Math.round(180*r/Math.PI);return 0>angle&&(angle=360-Math.abs(angle)),angle}function calculateDirection(startPoint,endPoint){if(comparePoints(startPoint,endPoint))return NONE;var angle=calculateAngle(startPoint,endPoint);return 45>=angle&&angle>=0?LEFT:360>=angle&&angle>=315?LEFT:angle>=135&&225>=angle?RIGHT:angle>45&&135>angle?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.x<bounds.right&&point.y>bounds.top&&point.y<bounds.bottom}function comparePoints(pointA,pointB){return pointA.x==pointB.x&&pointA.y==pointB.y}var options=$.extend({},options),useTouchEvents=SUPPORTS_TOUCH||SUPPORTS_POINTER||!options.fallbackToMouseEvents,START_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerDown":"pointerdown":"touchstart":"mousedown",MOVE_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerMove":"pointermove":"touchmove":"mousemove",END_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerUp":"pointerup":"touchend":"mouseup",LEAVE_EV=useTouchEvents?SUPPORTS_POINTER?"mouseleave":null:"mouseleave",CANCEL_EV=SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerCancel":"pointercancel":"touchcancel",distance=0,direction=null,currentDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,pinchDirection=0,maximumsMap=null,$element=$(element),phase="start",fingerCount=0,fingerData={},startTime=0,endTime=0,previousTouchEndTime=0,fingerCountAtRelease=0,doubleTapStartTime=0,singleTapTimeout=null,holdTimeout=null;try{$element.on(START_EV,touchStart),$element.on(CANCEL_EV,touchCancel)}catch(e){$.error("events not supported "+START_EV+","+CANCEL_EV+" on jQuery.swipe")}this.enable=function(){return this.disable(),$element.on(START_EV,touchStart),$element.on(CANCEL_EV,touchCancel),$element},this.disable=function(){return removeListeners(),$element},this.destroy=function(){removeListeners(),$element.data(PLUGIN_NS,null),$element=null},this.option=function(property,value){if("object"==typeof property)options=$.extend(options,property);else if(void 0!==options[property]){if(void 0===value)return options[property];options[property]=value}else{if(!property)return options;$.error("Option "+property+" does not exist on jQuery.swipe.options")}return null}}var VERSION="1.6.18",LEFT="left",RIGHT="right",UP="up",DOWN="down",IN="in",OUT="out",NONE="none",AUTO="auto",SWIPE="swipe",PINCH="pinch",TAP="tap",DOUBLE_TAP="doubletap",LONG_TAP="longtap",HORIZONTAL="horizontal",VERTICAL="vertical",ALL_FINGERS="all",DOUBLE_TAP_THRESHOLD=10,PHASE_START="start",PHASE_MOVE="move",PHASE_END="end",PHASE_CANCEL="cancel",SUPPORTS_TOUCH="ontouchstart"in window,SUPPORTS_POINTER_IE10=window.navigator.msPointerEnabled&&!window.PointerEvent&&!SUPPORTS_TOUCH,SUPPORTS_POINTER=(window.PointerEvent||window.navigator.msPointerEnabled)&&!SUPPORTS_TOUCH,PLUGIN_NS="TouchSwipe",defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};$.fn.swipe=function(method){var $this=$(this),plugin=$this.data(PLUGIN_NS);if(plugin&&"string"==typeof method){if(plugin[method])return plugin[method].apply(plugin,Array.prototype.slice.call(arguments,1));$.error("Method "+method+" does not exist on jQuery.swipe")}else if(plugin&&"object"==typeof method)plugin.option.apply(plugin,arguments);else if(!(plugin||"object"!=typeof method&&method))return init.apply(this,arguments);return $this},$.fn.swipe.version=VERSION,$.fn.swipe.defaults=defaults,$.fn.swipe.phases={PHASE_START:PHASE_START,PHASE_MOVE:PHASE_MOVE,PHASE_END:PHASE_END,PHASE_CANCEL:PHASE_CANCEL},$.fn.swipe.directions={LEFT:LEFT,RIGHT:RIGHT,UP:UP,DOWN:DOWN,IN:IN,OUT:OUT},$.fn.swipe.pageScroll={NONE:NONE,HORIZONTAL:HORIZONTAL,VERTICAL:VERTICAL,AUTO:AUTO},$.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:ALL_FINGERS}});

/* end /web-platform/scripts/libs/jquery/plugins/jquery.touchSwipe-1.6.19.min.js*/

/* start /web-platform/scripts/libs/utils/easing.js*/
var easing=function(n){function t(r){if(e[r])return e[r].exports;var u=e[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var e={};return t.m=n,t.c=e,t.p="",t(0)}([function(n,t){"use strict";function e(n){return n}function r(n){return-1*Math.cos(n*(Math.PI/2))+1}function u(n){return Math.sin(n*(Math.PI/2))}function a(n){return-.5*(Math.cos(Math.PI*n)-1)}function i(n){return n*n}function o(n){return n*(2-n)}function s(n){return.5>n?2*n*n:-1+(4-2*n)*n}function c(n){return n*n*n}function f(n){var t=n-1;return t*t*t+1}function h(n){return.5>n?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1}function M(n){return n*n*n*n}function v(n){var t=n-1;return 1-t*t*t*t}function I(n){var t=n-1;return.5>n?8*n*n*n*n:1-8*t*t*t*t}function O(n){return n*n*n*n*n}function p(n){var t=n-1;return 1+t*t*t*t*t}function d(n){var t=n-1;return.5>n?16*n*n*n*n*n:1+16*t*t*t*t*t}function l(n){return 0===n?0:Math.pow(2,10*(n-1))}function P(n){return 1===n?1:-Math.pow(2,-10*n)+1}function Q(n){if(0===n||1===n)return n;var t=2*n,e=t-1;return 1>t?.5*Math.pow(2,10*e):.5*(-Math.pow(2,-10*e)+2)}function w(n){var t=n/1;return-1*(Math.sqrt(1-t*n)-1)}function x(n){var t=n-1;return Math.sqrt(1-t*t)}function g(n){var t=2*n,e=t-2;return 1>t?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-e*e)+1)}function B(n){var t=arguments.length<=1||void 0===arguments[1]?1.70158:arguments[1],e=n/1;return e*e*((t+1)*e-t)}function C(n){var t=arguments.length<=1||void 0===arguments[1]?1.70158:arguments[1],e=n/1-1;return e*e*((t+1)*e+t)+1}function E(n){var t=arguments.length<=1||void 0===arguments[1]?1.70158:arguments[1],e=2*n,r=e-2,u=1.525*t;return 1>e?.5*e*e*((u+1)*e-u):.5*(r*r*((u+1)*r+u)+2)}function b(n){var t=arguments.length<=1||void 0===arguments[1]?.7:arguments[1];if(0===n||1===n)return n;var e=n/1,r=e-1,u=1-t,a=u/(2*Math.PI)*Math.asin(1);return-(Math.pow(2,10*r)*Math.sin((r-a)*(2*Math.PI)/u))}function q(n){var t=arguments.length<=1||void 0===arguments[1]?.7:arguments[1],e=1-t,r=2*n;if(0===n||1===n)return n;var u=e/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*r)*Math.sin((r-u)*(2*Math.PI)/e)+1}function k(n){var t=arguments.length<=1||void 0===arguments[1]?.65:arguments[1],e=1-t;if(0===n||1===n)return n;var r=2*n,u=r-1,a=e/(2*Math.PI)*Math.asin(1);return 1>r?-.5*(Math.pow(2,10*u)*Math.sin((u-a)*(2*Math.PI)/e)):Math.pow(2,-10*u)*Math.sin((u-a)*(2*Math.PI)/e)*.5+1}function S(n){var t=n/1;if(1/2.75>t)return 7.5625*t*t;if(2/2.75>t){var e=t-1.5/2.75;return 7.5625*e*e+.75}if(2.5/2.75>t){var r=t-2.25/2.75;return 7.5625*r*r+.9375}var u=t-2.625/2.75;return 7.5625*u*u+.984375}function _(n){return 1-S(1-n)}function j(n){return.5>n?.5*_(2*n):.5*S(2*n-1)+.5}Object.defineProperty(t,"__esModule",{value:!0}),t.linear=e,t.easeInSine=r,t.easeOutSine=u,t.easeInOutSine=a,t.easeInQuad=i,t.easeOutQuad=o,t.easeInOutQuad=s,t.easeInCubic=c,t.easeOutCubic=f,t.easeInOutCubic=h,t.easeInQuart=M,t.easeOutQuart=v,t.easeInOutQuart=I,t.easeInQuint=O,t.easeOutQuint=p,t.easeInOutQuint=d,t.easeInExpo=l,t.easeOutExpo=P,t.easeInOutExpo=Q,t.easeInCirc=w,t.easeOutCirc=x,t.easeInOutCirc=g,t.easeInBack=B,t.easeOutBack=C,t.easeInOutBack=E,t.easeInElastic=b,t.easeOutElastic=q,t.easeInOutElastic=k,t.easeOutBounce=S,t.easeInBounce=_,t.easeInOutBounce=j}]);

/* end /web-platform/scripts/libs/utils/easing.js*/

/* start /web-platform/scripts/web-platform/component/media-modal.js*/
window.SOE=window.SOE||{};window.SOE.MediaModal=(function(){'use strict';var YOUTUBE_FAILURE_RETRY_COUNT=3;var _numDots=5;var _dotBarAutosizeSettings=null;var _numVideoThumbs=6;var _didInit=false;var _youTubeInitStarted=false;var _youTubeInitFinished=false;var _downloadListFunc=null;var _filterFunc=null;var _originalUrl=null;var _imageInfo=null;var _youTubeVideos=null;let youTubePlayer;function _updateDotPos(idx){var $allDots=$('#dotOverflowContainer .dot');var $visibleDots=$allDots.filter(':not(.filtered)');var pageIdx=Math.floor($visibleDots.index($allDots.eq(idx))/_numDots);$allDots.removeClass('active').eq(idx).addClass('active');$('#dotOverflowContainer').stop().animate({left:pageIdx* -$('#paginationDotContainer').width()},function(){$('.modalControl').removeClass('disabled');});_updateDownloadList(idx);_updatePermalink(idx);}
function _updateDownloadList(dotIdx){if(_downloadListFunc){_downloadListFunc(_imageInfo[dotIdx].userId,$('#mediaModalDownload ul').empty());}}
function _updatePermalink(dotIdx){if(_originalUrl&&window.history.replaceState){window.history.replaceState(null,document.title,_imageInfo[dotIdx].permalinkUrl);}}
function _autosizeDotBar(){if(_dotBarAutosizeSettings){var windowWidth=window.innerWidth||document.documentElement.clientWidth;var totalDots=parseInt($('#mediaModalHeader .mediaTotal').text(),10);var widestPossibleContainer=Math.floor((windowWidth*_dotBarAutosizeSettings.maxWidth)/_dotBarAutosizeSettings.dotWidth)*_dotBarAutosizeSettings.dotWidth;var allDotsWidth=totalDots*_dotBarAutosizeSettings.dotWidth;var finalDotBarWidth=Math.min(widestPossibleContainer,allDotsWidth);var visibleDots=(finalDotBarWidth/_dotBarAutosizeSettings.dotWidth);var allDotsVisible=(visibleDots>=totalDots);$('#media-modal .pagNavBtn').toggleClass('hidden',allDotsVisible);$('#paginationDotContainer').width(finalDotBarWidth);setDotCount(visibleDots);}}
function _init(){if(_didInit){return;}
_didInit=true;$('#media-modal').on('soe.updateDot',function(evt,dot){var $allDots=$('#dotOverflowContainer .dot');var $visibleDots=$allDots.filter(':not(.filtered)');$('#media-modal-image').attr('src',_imageInfo[dot].imageUrl);$('#mediaModalHeader .mediaNum').text($visibleDots.index($allDots.eq(dot))+1);_updateDotPos(dot);});$('#media-modal').on('soe.arrowClick',function(evt,dir){var $allDots=$('#dotOverflowContainer .dot');var $visibleDots=$allDots.filter(':not(.filtered)');var selectedVisibleDot=$visibleDots.index($allDots.filter('.active'))+1;var selectedDot;if(dir==='next'){if(selectedVisibleDot<$visibleDots.length){selectedVisibleDot++;}else{selectedVisibleDot=1;}}else if(selectedVisibleDot>1){selectedVisibleDot--;}else{selectedVisibleDot=$visibleDots.length;}
selectedDot=$allDots.index($visibleDots.eq(selectedVisibleDot-1));$('#media-modal-image').attr('src',_imageInfo[selectedDot].imageUrl);$('#mediaModalHeader .mediaNum').text(selectedVisibleDot);_updateDotPos(selectedDot);});$('#media-modal').on('click','.pagDot',function(){var idx=$('#dotOverflowContainer .pagDot').index(this);$('#media-modal').trigger('soe.updateDot',idx);});$('#media-modal').on('keydown',function(key){if(key.which===37){$('#media-modal').trigger('soe.arrowClick','prev');}else if(key.which===39){$('#media-modal').trigger('soe.arrowClick','next');}});$('.modalTraverse').on('click',function(){$('#media-modal').trigger('soe.arrowClick',this.getAttribute('rel'));});$('#media-modal').on('mouseenter','.pagDot',function(){var $this=$(this);var idx=$('#dotOverflowContainer .pagDot').index($this);var dotWidth=parseInt($this.outerWidth(true),10)/2;var dotLeft=$this.offset().left;var tooltip=$('#paginationImages');if(!tooltip.hasClass('hidden')){var tooltipWidth=parseInt(tooltip.outerWidth(),10)/2;tooltip.stop().animate({left:(dotLeft+dotWidth)-tooltipWidth},'fast');$('#paginationImgSlider').stop().animate({left:idx* -parseInt(tooltip.width(),10)},'fast');tooltip.show();}});$('#media-modal').on('mouseleave','.pagDot',function(){$('#paginationImages').hide();});$('.pagNavBtn').on('click',function(){var dotContainer=$('#dotOverflowContainer');var pageContainer=$('#paginationDotContainer');var pageWidth=pageContainer.width();var pages=Math.ceil(dotContainer.find('.dot:not(.filtered)').length/_numDots);var nextShift;var maxContainerShift=((pages-1)* -pageWidth);if(this.getAttribute('rel')==='next'){nextShift=parseInt(dotContainer.css('left'),10)-pageWidth;if(nextShift<maxContainerShift){dotContainer.stop().animate({left:0});}else{dotContainer.stop().animate({left:nextShift});}}else{nextShift=parseInt(dotContainer.css('left'),10)+pageWidth;if(nextShift>0){dotContainer.stop().animate({left:maxContainerShift});}else{dotContainer.stop().animate({left:nextShift});}}});$('#mediaModalFilter').on('click','.dropdown-menu a',function(e){e.preventDefault();if(_filterFunc){var $allDots,$visibleDots;var filterId=this.getAttribute('data-filter-id');$('#dotOverflowContainer .dot').each(function(dotIdx){$(this).toggleClass('filtered',!_filterFunc(_imageInfo[dotIdx].userId,filterId));});$allDots=$('#dotOverflowContainer .dot');$visibleDots=$allDots.filter(':not(.filtered)');$('#mediaModalHeader .mediaTotal').text($visibleDots.length);_autosizeDotBar();$('#media-modal').trigger('soe.updateDot',$allDots.index($visibleDots.eq(0)));}});$(document).on('hide.bs.modal','#media-modal.image-content',function(){if(_originalUrl&&window.history.replaceState){window.history.replaceState(null,document.title,_originalUrl);}
$(window).off('.mediaModal');_downloadListFunc=null;_filterFunc=null;_originalUrl=null;_imageInfo=null;});}
function _initYouTube(readyFn){if(_youTubeInitFinished){if(readyFn){readyFn();}
return;}
if(readyFn){$(document).on('onYouTubeIframeAPIReady',function(){readyFn();});}
if(_youTubeInitStarted){return;}
_youTubeInitStarted=true;$(document).on('show.bs.modal','#media-modal.video-content',function(){if($('#media-modal .modal-video-playlist ul li').length<=0){youTubePlayer=new YT.Player($('#media-modal .modal-video-replace').get(0),{width:'100%',height:'100%',host:'https://www.youtube-nocookie.com',playerVars:{autoplay:1,theme:'dark',color:'black',rel:0,wmode:'opaque'},videoId:$(this).data('youtube-video-id'),events:{onReady:videoReady,onStateChange:videoStateChange,onError:videoError}});}else{startPlaylist();}});function videoReady(e){$(document).trigger('onYouTubeReady',e);}
function videoStateChange(e){$(document).trigger('onYouTubeStateChange',e);}
function videoError(e){$(document).trigger('onYouTubeError',e);}
function startPlaylist(){youTubePlayer=new YT.Player($('#media-modal .modal-video-replace').get(0),{host:'https://www.youtube-nocookie.com',playerVars:{autoplay:1,theme:'dark',color:'black',rel:0,wmode:'opaque'},events:{onReady:playlistReady,onStateChange:playlistStateChange,onError:playlistError}});}
function playlistReady(e){var playlist=_.pluck(_youTubeVideos,'id');var startVideo=$('#media-modal.video-content').data('youtube-video-id');$('#media-modal .modal-video-playlist').data('youtube-fail-count',0);youTubePlayer.loadPlaylist(playlist.join(','),playlist.indexOf(startVideo));$(document).trigger('onYouTubeReady',e);}
function playlistStateChange(e){var currentVideoIndex;if(e.data===YT.PlayerState.PLAYING){currentVideoIndex=youTubePlayer.getPlaylistIndex();$('#media-modal .modal-video-playlist a').removeClass('now-playing').eq(currentVideoIndex).addClass('now-playing');$('#media-modal .modal-video-details .title').text(_youTubeVideos[currentVideoIndex].title);$('#media-modal .modal-video-details .username').attr('href','https://www.youtube.com/channel/'+_youTubeVideos[currentVideoIndex].channelId).text(_youTubeVideos[currentVideoIndex].username);$('#media-modal .modal-video-details .date').text(_youTubeVideos[currentVideoIndex].timestamp.toDateString());showPlaylistPage(Math.floor(currentVideoIndex/_numVideoThumbs));}
$(document).trigger('onYouTubeStateChange',e);}
function playlistError(e){var failureCount;if(e.data===5){failureCount=$('#media-modal .modal-video-playlist').data('youtube-fail-count');if(failureCount<YOUTUBE_FAILURE_RETRY_COUNT){youTubePlayer.stopVideo();$('#media-modal .modal-video-replace').after('<div class="modal-video-replace"></div>').remove();$('#media-modal .modal-video-playlist').data('youtube-fail-count',failureCount+1);$('#media-modal').data('youtube-video-id',_youTubeVideos[youTubePlayer.getPlaylistIndex()].id);startPlaylist();}}
$(document).trigger('onYouTubeError',e);}
function showPlaylistPage(page){$('#media-modal .modal-video-playlist ul').data('page',page).css('margin-left',(page* -100)+'%');}
function getPlaylistPage(){return $('#media-modal .modal-video-playlist ul').data('page');}
$(document).on('hide.bs.modal','#media-modal.video-content',function(){try{youTubePlayer.stopVideo();youTubePlayer.destroy();youTubePlayer=null;}catch(e){}
$('#media-modal .modal-video').empty();_youTubeVideos=null;});$(document).on('click','#media-modal.video-content .modal-video-playlist a',function(){var selectedIndex=$('#media-modal .modal-video-playlist a').index(this);youTubePlayer.playVideoAt(selectedIndex);});$(document).on('click','#media-modal.video-content .playlist-pag-prev, #media-modal.video-content .playlist-pag-next',function(){var newPage,currentPage=getPlaylistPage(),firstPage=0,lastPage=(Math.ceil(_youTubeVideos.length/_numVideoThumbs)-1);if($(this).hasClass('playlist-pag-prev')){newPage=currentPage<=firstPage?lastPage:(currentPage-1);}else{newPage=currentPage>=lastPage?firstPage:(currentPage+1);}
showPlaylistPage(newPage);});window.onYouTubeIframeAPIReady=function(e){_youTubeInitFinished=true;$(document).trigger('onYouTubeIframeAPIReady',e);};}
function setDotCount(numDots){if(numDots>0){_numDots=numDots;}}
function setAutosizeDotBar(options){if(options){var defaults={maxWidth:0.7,dotWidth:1};_dotBarAutosizeSettings=$.extend({},defaults,options);}else{_dotBarAutosizeSettings=null;}}
function setupGroup(options){var defaults={container:null,selector:'a',hidePaginationThumbs:false,permalinkAttribute:null,userIdAttribute:null};var _options=$.extend({},defaults,options);_init();$(_options.container).on('click',_options.selector,function(e){var i,imageInfo=[];var localOptions=$.extend({},_options);var $allItems=$(localOptions.container).find(localOptions.selector);for(i=0;i<$allItems.length;++i){imageInfo.push({imageUrl:$allItems[i].getAttribute('href'),thumbUrl:localOptions.hidePaginationThumbs?null:$allItems.eq(i).find('img').attr('src'),userId:localOptions.userIdAttribute?$allItems[i].getAttribute(localOptions.userIdAttribute):null,permalinkUrl:localOptions.permalinkAttribute?$allItems[i].getAttribute(localOptions.permalinkAttribute):null});}
localOptions.hasPermalinks=Boolean(localOptions.permalinkAttribute);localOptions.hasThumbs=!localOptions.hidePaginationThumbs;localOptions.imageInfo=imageInfo;localOptions.initialItem=$allItems.index(this);showGroup(localOptions);e.preventDefault();});}
function showGroup(options){var defaults={typeName:null,containY:false,centerY:false,hasThumbs:false,hasPermalinks:false,downloadListFunc:null,filterList:null,filterFunc:null,initialItem:0,imageInfo:[]};var i,dotContainerWidth,dotMarkup='',paginationMarkup='';var _options=$.extend({},defaults,options);var dotTemplate=$('#tpl-pagination-dot').html();var filterTemplate=_.template($('#tpl-media-filter-list-item').html());var hasDownloads=(typeof _options.downloadListFunc==='function');var hasFilters=Boolean((_options.filterList&&options.filterList.length>0&&typeof _options.filterFunc==='function'));_init();_imageInfo=_options.imageInfo;$('#mediaModalHeader .mediaType').text(_options.typeName);$('#mediaModalHeader .mediaNum').text(_options.initialItem+1);$('#mediaModalHeader .mediaTotal').text(_options.imageInfo.length);$('#media-modal-image').attr('src',_options.imageInfo[_options.initialItem].imageUrl);$('#mediaModalDownload').toggleClass('hidden',!hasDownloads);$('#mediaModalFilter').toggleClass('hidden',!hasFilters);$('#dotOverflowContainer').empty().width(9999999);$('#paginationImgSlider').empty();$('#paginationImages').toggleClass('hidden',!_options.hasThumbs);for(i=0;i<_options.imageInfo.length;++i){dotMarkup+=dotTemplate;if(_options.hasThumbs){paginationMarkup+='<img src="'+_options.imageInfo[i].thumbUrl+'"/>';}}
$('#dotOverflowContainer').append($(dotMarkup));$('#paginationImgSlider').width(9999999).append($(paginationMarkup));$('#dotOverflowContainer .dot').eq(_options.initialItem).addClass('active');if(_options.hasPermalinks){_originalUrl=window.location.href;_updatePermalink(_options.initialItem);}
if(hasDownloads){_downloadListFunc=_options.downloadListFunc;_updateDownloadList(_options.initialItem);}
if(hasFilters){_filterFunc=_options.filterFunc;$('#mediaModalFilter ul').empty();for(i=0;i<_options.filterList.length;++i){$('#mediaModalFilter ul').append($(filterTemplate({filterId:_options.filterList[i].id,filterTitle:_options.filterList[i].title})));}}
if(_dotBarAutosizeSettings){$(window).on('resize.mediaModal',_autosizeDotBar);_autosizeDotBar();}
dotContainerWidth=$('#paginationDotContainer').width();$('#dotOverflowContainer').css('left',(Math.ceil((_options.initialItem+1)/_numDots)-1)* -dotContainerWidth);$('#media-modal').removeClass().addClass('modal fade image-content');$('#media-modal').toggleClass('contain-y',_options.containY);$('#media-modal').toggleClass('center-y',_options.centerY);$('#media-modal').modal();}
function setupPoster(options){var defaults={container:null,selector:'a'};var _options=$.extend({},defaults,options);_init();$(_options.container).on('click',_options.selector,function(event){showPoster($.extend({},_options,{url:this.getAttribute('href')}));event.preventDefault();});}
function showPoster(options){var defaults={scroll:true,containY:false};var _options=$.extend({},defaults,options);_init();$('#media-modal-image').attr('src',_options.url);$('#media-modal').removeClass().addClass('modal fade image-content');$('#media-modal').toggleClass('full-scroll',_options.scroll);$('#media-modal').toggleClass('full-fixed',!_options.scroll);$('#media-modal').toggleClass('contain-y',_options.containY);$('#media-modal').modal();}
function setTrayThumbCount(thumbsPerPage){if(thumbsPerPage>0){_numVideoThumbs=thumbsPerPage;}}
function findYouTubeId(url){var idSniff=/(?:youtube\.com\/(?:[^/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?/ ]{11})/i;var matches=url.match(idSniff);if(matches&&matches.length>=2){return matches[1];}else{return null;}}
function setupYouTube(options){if(!globs.wdl.wdlCookDNT){_initYouTube(function(){var defaults={linkSelector:null,defaultVideoID:null};var _options=$.extend({},defaults,options);$(document).on('click',_options.linkSelector,function(event){var videoID;if($(window).width()>=768){event.preventDefault();videoID=findYouTubeId(this.getAttribute('href'))||_options.defaultVideoID;showYouTube({videoId:videoID});}});});}}
function showYouTube(options){if(!globs.wdl.wdlCookDNT){_initYouTube(function(){var defaults={videoId:null,videos:null};var i,playlistTemplate,playlistContents;var _options=$.extend({},defaults,options);var $modal=$('#media-modal');if(youTubePlayer){youTubePlayer.stopVideo();youTubePlayer.destroy();youTubePlayer=null;}
$modal.data('youtube-video-id',_options.videoId);$modal.find('.modal-video').html($('#tpl-youtube-video-default-markup').html());if(_options.videos&&_options.videos.length>0){playlistTemplate=_.template($('#tpl-youtube-playlist-item').html());playlistContents='';for(i=0;i<_options.videos.length;++i){playlistContents+=playlistTemplate(_options.videos[i]);}
_youTubeVideos=_options.videos;$modal.find('.modal-video-playlist ul').html(playlistContents).data('page',0);$modal.find('.modal-video-playlist .playlist-count').text(_options.videos.length);$modal.removeClass().addClass('modal fade video-content playlist');$modal.modal();}else{$modal.removeClass().addClass('modal fade video-content in');$modal.modal();}});}}
function isReady(){return _youTubeInitFinished;}
return{setDotCount:setDotCount,setAutosizeDotBar:setAutosizeDotBar,setupGroup:setupGroup,showGroup:showGroup,setTrayThumbCount:setTrayThumbCount,setupYouTube:setupYouTube,showYouTube:showYouTube,setupPoster:setupPoster,showPoster:showPoster,findYouTubeId:findYouTubeId,isReady:isReady};}());

/* end /web-platform/scripts/web-platform/component/media-modal.js*/

/* start /web-platform/scripts/web-platform/component/media-query-detection.js*/
SOE.MediaQueryDetection=(function(){var currentSize;var currentBreakPoint;var breakPoints=[{size:480,value:"xs"},{size:768,value:"xs"},{size:992,value:"sm"},{size:1200,value:"md"},{size:1e9,value:"lg"}];var detectBreakpointChange=function(){var newBreakPoint=detectBreakpoint();if(currentBreakPoint!==newBreakPoint.size){currentBreakPoint=newBreakPoint.size;$(window).trigger("soe.breakpointChanged",{breakpoint:newBreakPoint.value});}};var detectBreakpoint=function(){var k;currentSize=window.innerWidth||document.documentElement.clientWidth;for(k=0;k<breakPoints.length;k++){if(currentSize<breakPoints[k].size){break;}}
return breakPoints[k];};var init=function(){currentBreakPoint=detectBreakpoint().size;$(window).on("resize",detectBreakpointChange);$(window).trigger("soe.breakpointSet",{breakpoint:detectBreakpoint().value});};return{init:init,detectBreakpoint:detectBreakpoint};})();SOE.MediaQueryDetection.init();

/* end /web-platform/scripts/web-platform/component/media-query-detection.js*/

/* start /web-platform/scripts/web-platform/component/hero-carousel/hero-carousel.js*/
window.SOE=window.SOE||{};SOE.HeroCarousel={currentVersion:'',renderMobileVersion:function(){'use strict';$('.carousel-outer-wrapper').html(_.template($('#tpl-carousel-mobile').html()));},renderDesktopVersion:function(){'use strict';var intervalTime=parseInt($('.carousel-outer-wrapper').attr('data-interval-time'),10)||5000;var transitionTime=parseInt($('.carousel-outer-wrapper').attr('data-transition-time'),10)||400;var transitionStyle=$('.carousel-outer-wrapper').attr('data-transition-style')||'duck';$('.carousel-outer-wrapper').html(_.template($('#tpl-carousel-desktop').html()));$('.carousel').on('slide.bs.carousel',function(e){var fadeOutDelay=transitionStyle==='dissolve'?transitionTime:0;var fadeOutTime=transitionStyle==='dissolve'?0:transitionTime;var fadeInDelay=transitionStyle==='dissolve'?0:transitionTime;var fadeInTime=transitionTime;$('.background-takeovers .background-takeover').delay(fadeOutDelay).fadeOut(fadeOutTime,function(){$(this).remove();});$('.background-takeover',e.relatedTarget).clone().appendTo('.background-takeovers').delay(fadeInDelay).fadeIn(fadeInTime).find('.background[data-scale-start][data-scale-end]').animate({bgScale:1},{duration:intervalTime,progress:SOE.HeroCarousel.zoomProgress,queue:false,easing:'linear'});SOE.HeroCarousel.updateCaptions($(e.relatedTarget));});$('.carousel').each(function(){var $this=$(this);var id=$this.attr('id');try{$('#'+id).swipe({excludedElements:'button, input, select, textarea, .noSwipe',swipeLeft:function(){$this.carousel('next');},swipeRight:function(){$this.carousel('prev');},tap:function(event,target){if(typeof window.ontouchstart!=='undefined'){$(target).trigger('click');}}});}catch(e){}});if($('.item.active .background-takeover').length>0){$('.item.active .background-takeover').clone().css('display','block').appendTo('.background-takeovers').find('.background[data-scale-start][data-scale-end]').animate({bgScale:1},{duration:intervalTime,progress:SOE.HeroCarousel.zoomProgress,queue:false,easing:'linear'});}
SOE.HeroCarousel.createBackgroundVideos();SOE.HeroCarousel.createCtaLinks();$('.carousel').carousel({interval:intervalTime});SOE.HeroCarousel.updateCaptions($('.carousel-inner .item.active'));$(document).on('mouseenter','.background-takeovers .markup',function(){$('.carousel').carousel('pause');});$(document).on('mouseleave','.background-takeovers .markup',function(){$('.carousel').carousel('cycle');});},zoomProgress:function(animation,progress){'use strict';function lerp(a,b,x){return(a*(1-x))+(b*x);}
if(this.hasAttribute('data-scale-start')&&this.hasAttribute('data-scale-end')){var startScale=parseFloat(this.getAttribute('data-scale-start'));var endScale=parseFloat(this.getAttribute('data-scale-end'));var currentScale=lerp(startScale,endScale,easing.easeInOutQuad(progress));this.style.transform='scale('+currentScale+')';}},updateCaptions:function($activeSlide){'use strict';var useCaptions=$('.carousel-outer-wrapper').hasClass('carousel-captioned');var captionEllipsisLength=parseInt($('.carousel-outer-wrapper').attr('data-caption-ellipsis-length'),10)||30;var $allSlides;var idxCurrent,idxPrev,idxNext;if(useCaptions){$allSlides=$('.carousel-inner .item');idxCurrent=$allSlides.index($activeSlide);idxNext=(idxCurrent+1)%$allSlides.length;idxPrev=idxCurrent-1;if(idxPrev<0){idxPrev+=$allSlides.length;}
$('.carousel-control.left .carousel-control-caption').html(SOE.Utils.ellipsisAtBreak($allSlides.eq(idxPrev).attr('data-title')||'',captionEllipsisLength));$('.carousel-control.right .carousel-control-caption').html(SOE.Utils.ellipsisAtBreak($allSlides.eq(idxNext).attr('data-title')||'',captionEllipsisLength));}},createCtaLinks:function(){'use strict';function isNonEmptyTextNode(i,el){return el.nodeType===3&&el.textContent.trim().length>0;}
$('.wgt-hero-2 > .markup').each(function(){var $markup=$(this);$markup.children('p').each(function(){var $paragraph=$(this);if($paragraph.contents().filter(isNonEmptyTextNode).length<=0){$paragraph.addClass('cta-wrapper');$paragraph.children('a').addClass('cta');}});if($markup.find('.cta.primary').length<=0){$markup.find('.cta').first().addClass('primary');}});},createBackgroundVideos:function(){'use strict';var videoTemplate=_.template($('#tpl-carousel-video').html(),null,{variable:'data'});var breakpoint=SOE.MediaQueryDetection.detectBreakpoint().value;function hasVideoAttributes(i,el){return el.hasAttribute('data-video-mp4')||el.hasAttribute('data-video-webm');}
$('.background-takeover .background').filter(hasVideoAttributes).each(function(i,el){if(breakpoint!=='xs'||el.classList.contains('needs-video')){$(this).addClass('has-video').append(videoTemplate({mp4:el.getAttribute('data-video-mp4'),webm:el.getAttribute('data-video-webm')}));}});}};if(document.getElementById('tpl-carousel-mobile')!==null){if(SOE.MediaQueryDetection.detectBreakpoint().value==='xs'){SOE.HeroCarousel.renderMobileVersion();SOE.HeroCarousel.currentVersion='mobile';}else{SOE.HeroCarousel.renderDesktopVersion();SOE.HeroCarousel.currentVersion='desktop';}
$(window).on('soe.breakpointChanged',function(e,breakpoint){'use strict';if(breakpoint.breakpoint==='xs'&&SOE.HeroCarousel.currentVersion!=='mobile'){SOE.HeroCarousel.renderMobileVersion();SOE.HeroCarousel.currentVersion='mobile';}else if((breakpoint.breakpoint==='sm'||breakpoint.breakpoint==='md'||breakpoint.breakpoint==='lg')&&SOE.HeroCarousel.currentVersion!=='desktop'){SOE.HeroCarousel.renderDesktopVersion();SOE.HeroCarousel.currentVersion='desktop';}});}else{SOE.HeroCarousel.renderDesktopVersion();SOE.HeroCarousel.currentVersion=(SOE.MediaQueryDetection.detectBreakpoint().value==='xs')?'mobile':'desktop';$(window).on('soe.breakpointChanged',function(e,breakpoint){'use strict';if((breakpoint.breakpoint==='xs'&&SOE.HeroCarousel.currentVersion!=='mobile')||(breakpoint.breakpoint!=='xs'&&SOE.HeroCarousel.currentVersion==='mobile')){SOE.HeroCarousel.renderDesktopVersion();SOE.HeroCarousel.currentVersion=(breakpoint.breakpoint==='xs')?'mobile':'desktop';}});}
$(document).on('click','.carousel-outer-wrapper a',function(e){'use strict';var videoId=SOE.MediaModal.findYouTubeId(this.getAttribute('href'));if(SOE.MediaModal.isReady()&&videoId&&$(window).width()>=768&&!globs.wdl.wdlCookDNT){e.preventDefault();SOE.MediaModal.showYouTube({videoId:videoId});}});

/* end /web-platform/scripts/web-platform/component/hero-carousel/hero-carousel.js*/

/* start /web-platform/scripts/web-platform/social/twittershare.js*/
SOE.TwitterShare=function(){"use strict";this.intents={reply:"tweet?in_reply_to",retweet:"retweet?tweet_id",favorite:"favorite?tweet_id",hashtag:"tweet?hashtags",user:"user?screen_name",follow:"follow?screen_name",sharelink:"tweet?url",tweet:"tweet?text"};this.addListener();};SOE.TwitterShare.prototype.shareTweet=function(intent,id,targetWindow,$elm){"use strict";var extraParams=[];if(this.intents[intent]&&id){if(intent==="tweet"){extraParams.push("url="+encodeURIComponent($elm.attr("data-twitter-url")||$elm.attr("href")));}
extraParams=extraParams.length>0?("&"+extraParams.join("&")):"";window.open("https://twitter.com/intent/"+this.intents[intent]+"="+encodeURIComponent(id)+extraParams,targetWindow,"menubar=no,width=500,height=450,toolbar=no").focus();}else if(intent==="view"){var url="https://twitter.com/"+$elm.attr("data-twitter-author")+"/status/"+$elm.attr("data-twitter-id");window.open(url,targetWindow,"menubar=no,width=670,height=500,toolbar=no").focus();}};SOE.TwitterShare.prototype.addListener=function(){"use strict";$("body").on("click",".twitter-share, .ttr-share",function(evt){evt.preventDefault();var $elm=$(evt.currentTarget);var intent=$elm.data("twitter-action");var id=$elm.data("twitter-id");var targetWindow=$elm.data("target-window")||"twitter";if(intent&&id){this.shareTweet(intent,id,targetWindow,$elm);}}.bind(this));};SOE.TwitterShare.parseTimestamp=function(timeStamp){"use strict";var date=new Date(timeStamp);if(_.isNaN(date.getTime())){date=new Date(timeStamp.replace(/( \+)/,"UTC$1"));}
return date;};SOE.TwitterShare.formatTweet=function(text,formats){'use strict';if(typeof formats==='undefined'){return text;}
var k,item,replaceList;if(formats.media){for(k=0;k<formats.media.length;k++){item=formats.media[k];if(item.url){text=text.replace(item.url,'<a href="'+item.url+'" target="_blank">'+item.url+'</a>');}}}
if(formats.urls){for(k=0;k<formats.urls.length;k++){item=formats.urls[k];text=text.replace(item.url,'<a href="'+item.url+'" target="_blank">'+item.url+'</a>');}}
if(formats.hashtags){replaceList=_.pluck(formats.hashtags,'text').sort(function(a,b){return b.length-a.length;}).join('|');text=text.replace(new RegExp('#('+replaceList+')','ig'),'<a href="javascript:;" class="ttr-share" data-twitter-action="hashtag" data-twitter-id="$1">#$1</a>');}
if(formats.user_mentions){replaceList=_.pluck(formats.user_mentions,'screen_name').sort(function(a,b){return b.length-a.length;}).join('|');text=text.replace(new RegExp('@('+replaceList+')','ig'),'<a href="javascript:;" class="ttr-share" data-twitter-action="follow" data-twitter-id="$1">@$1</a>');}
return text;};$(document).ready(function(){"use strict";new SOE.TwitterShare();});

/* end /web-platform/scripts/web-platform/social/twittershare.js*/

/* start /web-platform/scripts/web-platform/social/facebookshare.js*/
$(document).ready(function(){"use strict";$(document).on("click",".facebook-share, .facebk-share",function(evt){evt.preventDefault();var url=this.getAttribute("href");var targetWindow=this.getAttribute("data-target-window")||"";window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(url),targetWindow,"menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600").focus();});});

/* end /web-platform/scripts/web-platform/social/facebookshare.js*/

/* start /web-platform/scripts/web-platform/helpers/jquery.constrainedAffix.js*/
(function($){'use strict';function _relayoutWhenReady(callback){if(window.requestAnimationFrame){return window.requestAnimationFrame(callback);}else{return window.setTimeout(callback,1);}}
$.fn.constrainedAffix=function(options){var repaintId=null;var $elements=this;var _options=$.extend({},options);if(_options.margin){_options.marginTop=_options.marginBottom=_options.margin;}
function updateAffix(){repaintId=null;var scrollTop=window.pageYOffset;var $constraintBox=$(_options.constraintBox);var constraintBottomScrolled=($constraintBox.offset().top+$constraintBox.innerHeight())-scrollTop;$elements.each(function(){var $this=$(this);var $contents=$this.find(_options.contents);var topScrolled=($this.offset().top-scrollTop);var contentsHeight=$contents.height()+_options.marginBottom;var marginTopVal=(typeof _options.marginTop=='function')?_options.marginTop():_options.marginTop;if(topScrolled>=marginTopVal){if($contents.hasClass('floating')){$contents.removeClass('floating').css('top','').trigger('un-affix');}}else{if(!$contents.hasClass('floating')){$contents.addClass('floating').trigger('affix');}
if((constraintBottomScrolled-marginTopVal)<contentsHeight){$contents.css('top',(constraintBottomScrolled-contentsHeight)+'px');}else{$contents.css('top',marginTopVal+'px');}}});}
$(window).on('scroll.constrainedAffix resize.constrainedAffix',function(){if(!repaintId){repaintId=_relayoutWhenReady(updateAffix);}});repaintId=_relayoutWhenReady(updateAffix);return this;};})(jQuery);

/* end /web-platform/scripts/web-platform/helpers/jquery.constrainedAffix.js*/

/* start /web-platform/scripts/web-platform/component/feed/feed.js*/
window.SOE=window.SOE||{};SOE.Feeds=SOE.Feeds||{};SOE.Feeds.defaultRenderer=(function(){'use strict';var FEED_ITEM_INCREASE={ALPHA:(SOE.Feeds.alphaCountIncrease||12),BETA:(SOE.Feeds.betaCountIncrease||12)};var sortedFeedLists={alpha:[],beta:[]};var feedDisplayLength={alpha:(SOE.Feeds.alphaCountInitial||12),beta:(SOE.Feeds.betaCountInitial||12)};function NEWEST_ON_TOP(a,b){if(a.priority===b.priority){return b.timestamp.getTime()-a.timestamp.getTime();}else{return b.priority-a.priority;}}
var columnLoopForward={startIndex:function(){return 0;},continueLoop:function(i,numColumns){return i<numColumns;},nextColumn:function(i){return i+1;}};var columnLoopBackward={startIndex:function(numColumns){return numColumns-1;},continueLoop:function(i){return i>=0;},nextColumn:function(i){return i-1;}};function columnHeight($column){return $column.children().get().reduce(function(acc,cur){return acc+$(cur).outerHeight(true);},0);}
function getColumnSizes(config){return config.feedOptions[SOE.Feeds.filter]?config.feedOptions[SOE.Feeds.filter].columnSizes:SOE.Feeds.columnSizes;}
function isColumn(currentColumn,columnCount){return function(obj,index){return index%columnCount===currentColumn;};}
var renders={md:function(config){var truncatedFeedColumns={alpha:sortedFeedLists.alpha.slice(0,feedDisplayLength.alpha),beta:sortedFeedLists.beta.slice(0,feedDisplayLength.beta)};var $alphaColumns=[];var $betaColumn=$('<div class="col-sm-2 column beta"></div>');var columnSizes=getColumnSizes(config);var numColumns=columnSizes.length;var columnLoop=SOE.Feeds.filter?columnLoopForward:columnLoopBackward;var k,j,alphaLeaderHeight,alphaFollowerHeight;config.$container.empty();for(k=0;k<numColumns;++k){$alphaColumns.push($(`<div class="col-sm-${ columnSizes[k] } column alpha"></div>`));config.$container.append($alphaColumns[k]);}
if(truncatedFeedColumns.beta.length>0){if(SOE.Feeds.betaColumnLeft){config.$container.prepend($betaColumn);}else{config.$container.append($betaColumn);}}
for(k=0;k<truncatedFeedColumns.alpha.length;){for(j=columnLoop.startIndex(numColumns);columnLoop.continueLoop(j,numColumns)&&k<truncatedFeedColumns.alpha.length;j=columnLoop.nextColumn(j)){if(j===columnLoop.startIndex(numColumns)){$alphaColumns[j].append(config.feedOptions[truncatedFeedColumns.alpha[k].type].template(truncatedFeedColumns.alpha[k]));alphaLeaderHeight=columnHeight($alphaColumns[j]);++k;}else{alphaFollowerHeight=columnHeight($alphaColumns[j]);while(alphaFollowerHeight<alphaLeaderHeight&&k<truncatedFeedColumns.alpha.length){$alphaColumns[j].append(config.feedOptions[truncatedFeedColumns.alpha[k].type].template(truncatedFeedColumns.alpha[k]));alphaFollowerHeight=columnHeight($alphaColumns[j]);++k;}}}}
for(k=0;k<truncatedFeedColumns.beta.length&&columnHeight($betaColumn)<alphaLeaderHeight;++k){$betaColumn.append(config.feedOptions[truncatedFeedColumns.beta[k].type].template(truncatedFeedColumns.beta[k]));}},sm:function(config){config.$container.html(renders.even(config,2));},xs:function(config){config.$container.html(renders.even(config,1));},even:function(config,columnCount){var items=sortedFeedLists.alpha.slice(0,feedDisplayLength.alpha).concat(sortedFeedLists.beta.slice(0,feedDisplayLength.beta)).sort(NEWEST_ON_TOP);var columns=_.range(columnCount).map(function(idx){return`${ items.filter(isColumn(idx, columnCount)).reduce(function(acc, item) {
					return acc + config.feedOptions[item.type].template(item);
				}, `<div class="col-sm-${ 12 / columnCount } column clearfix alpha">`) }</div>`;});return columns.join('');}};function getValidBreakpoint(breakpoint){var overrides={lg:'md'};return overrides[breakpoint]||breakpoint;}
function assignColumn(currentFilter,options){return function(item){return _.extend({},item,{column:item.column||(!currentFilter&&options.unfilteredColumn)?options.unfilteredColumn:options.column});};}
function isInColumn(colType){return function(o){return o.column===colType;};}
function sortFeedLists(config,currentFilter,colTypes){var allFeedItems=Array.prototype.concat.apply([],_.keys(config.feedLists).map(function(key){var options=config.feedOptions[key];var feedList=config.feedLists[key];return feedList.filter(config.includeFeedItem(currentFilter,options)).slice(0,config.sliceLength(currentFilter,options)).map(assignColumn(currentFilter,options));}));return colTypes.reduce(function(acc,cur){acc[cur]=allFeedItems.filter(isInColumn(cur)).sort(NEWEST_ON_TOP);return acc;},{});}
function renderFeed(config,size){if(typeof renders[size]==='function'){renders[size](config);}}
function sort(config,type,items){return items.sort(NEWEST_ON_TOP);}
function render(config){sortedFeedLists=sortFeedLists(config,SOE.Feeds.filter,['alpha','beta']);renderFeed(config,getValidBreakpoint(SOE.MediaQueryDetection.detectBreakpoint().value));}
function breakpointChanged(config,size){renderFeed(config,getValidBreakpoint(size));}
function loadMore(config){feedDisplayLength.alpha+=FEED_ITEM_INCREASE.ALPHA;feedDisplayLength.beta+=FEED_ITEM_INCREASE.BETA;render(config);}
function hasMore(config){return(feedDisplayLength.alpha<sortedFeedLists.alpha.length)||(feedDisplayLength.beta<sortedFeedLists.beta.length);}
return{sort:sort,render:render,breakpointChanged:breakpointChanged,loadMore:loadMore,hasMore:hasMore};}());SOE.Feeds.flatListRenderer=(function(){'use strict';var itemsDisplayed=SOE.Feeds.alphaCountInitial||7;var loadMoreIncrease=SOE.Feeds.alphaCountIncrease||12;var mergedFeed=[];function _sortByPriorityAndTimeDesc(a,b){if(a.priority===b.priority){return b.timestamp.getTime()-a.timestamp.getTime();}else{return b.priority-a.priority;}}
function _sortByTimeDesc(a,b){return b.timestamp.getTime()-a.timestamp.getTime();}
function _removeFeaturedFlag(item){if(item.isFeatured===true){return _.extend({},item,{isFeatured:false});}else{return item;}}
function sort(config,type,items){var allFeatured=items.filter(function(item){return item.isFeatured===true;}).sort(_sortByPriorityAndTimeDesc);var allNotFeatured=items.filter(function(item){return item.isFeatured!==true;});var allowedFeatured=(SOE.Feeds.suppressFeatured===true)?[]:allFeatured.slice(0,1);var rejectedFeatured=(SOE.Feeds.suppressFeatured===true)?allFeatured.map(_removeFeaturedFlag):allFeatured.slice(1).map(_removeFeaturedFlag);var allOthers=[].concat(rejectedFeatured,allNotFeatured);var allSticky=allOthers.filter(function(item){return item.priority>0;}).sort(_sortByPriorityAndTimeDesc);var allNotSticky=allOthers.filter(function(item){return item.priority<=0;});var allowedSticky=(typeof SOE.Feeds.maxStickies==='number')?allSticky.slice(0,SOE.Feeds.maxStickies):allSticky;var rejectedSticky=(typeof SOE.Feeds.maxStickies==='number')?allSticky.slice(SOE.Feeds.maxStickies):[];var sortedRemainder=[].concat(rejectedSticky,allNotSticky).sort(_sortByTimeDesc);return[].concat(allowedFeatured,allowedSticky,sortedRemainder);}
function _mergeFeeds(config,currentFilter){var merged=Array.prototype.concat.apply([],_.keys(config.feedLists).map(function(key){var options=config.feedOptions[key];var feedList=config.feedLists[key];return feedList.filter(config.includeFeedItem(currentFilter,options)).slice(0,config.sliceLength(currentFilter,options));}));return sort(config,currentFilter,merged);}
function render(config){mergedFeed=_mergeFeeds(config,SOE.Feeds.filter);var itemMarkup=mergedFeed.slice(0,itemsDisplayed).map(function(item){return config.feedOptions[item.type].template(item);}).join('');config.$container.html(`<div class="col-xs-12">${ itemMarkup }</div>`);}
function breakpointChanged(config,size){}
function loadMore(config){itemsDisplayed+=loadMoreIncrease;render(config);}
function hasMore(config){return mergedFeed.length>itemsDisplayed;}
return{sort:sort,render:render,breakpointChanged:breakpointChanged,loadMore:loadMore,hasMore:hasMore};}());SOE.Feed=(function(){'use strict';var FEED_STICKY_LEVELS={NONE:0,CONTENT:5,LIVE:6,LIVE_FEATURED:7,FEED:15};var ASYNC_TIMEOUT=1000;var ELLIPSIS_DEFAULT_LENGTH=65;var FEED_FILTER_ALL='all';var FEED_FILTER_ANY='*';var renderer=SOE.Feeds.customRenderer||SOE.Feeds.defaultRenderer;var sharerTemplate=_.template($('#feedSharer').html()||'');var shareTotalTemplate=_.template($('#feedShareTotal').html()||'');var asyncQueue={};var timer;var config={$container:$('#feedContainer'),feedLists:{},feedOptions:{},includeFeedItem:function(currentFilter,options){return function(item){var includeFilters=item.includeFilters||options.includeFilters||[FEED_FILTER_ALL,options.filterType];var excludeFilters=item.excludeFilters||options.excludeFilters||[];var currentFilterNamed=currentFilter||FEED_FILTER_ALL;return(_.contains(includeFilters,currentFilterNamed)||_.contains(includeFilters,FEED_FILTER_ANY))&&!_.contains(excludeFilters,currentFilterNamed);};},sliceLength:function(currentFilter,options){return(!currentFilter&&typeof options.unfilteredMax==='number')?options.unfilteredMax:undefined;}};function setRenderer(newRenderer){renderer=newRenderer;}
function isValidItem(item){return item!==false;}
function decorateItem(type){return function(item){return _.extend(item,{type:type,priority:item.priority||0});};}
function addFeedList(feedArray,type){config.feedLists[type]=feedArray.map(config.feedOptions[type].clean).filter(isValidItem).map(decorateItem(type));config.feedLists[type]=renderer.sort(config,type,config.feedLists[type]);}
function newFeed(feedArray,options){config.feedOptions[options.type]=options;addFeedList(feedArray,options.type);}
function updateLoadMoreButton(hasMore){$('.feed-load-more').toggle(hasMore);}
function init(){clearTimeout(timer);renderer.render(config);updateLoadMoreButton(renderer.hasMore(config));$(window).on('soe.breakpointChanged',function(evt,data){renderer.breakpointChanged(config,data.breakpoint);});$('.feed-loading').hide();}
function checkQueue(){if(_.values(asyncQueue).every(function(o){return o===true;})){init();}}
function newAsyncFeed(request,options){if(!timer){timer=setTimeout(init,ASYNC_TIMEOUT);}
asyncQueue[options.type]=false;config.feedOptions[options.type]=options;request.then(function(result){addFeedList(result,options.type);}).always(function(){asyncQueue[options.type]=true;checkQueue();});}
function basicEllipsis(str,length){return SOE.Utils.ellipsisAtBreak(str,typeof length==='number'?length:ELLIPSIS_DEFAULT_LENGTH);}
function cleanText(str,options){var defaults={stripTags:true,ellipsis:false,escape:true};var _options=_.extend({},defaults,options);var cleaned=str;if(str){if(_options.stripTags){cleaned=SOE.Utils.stripTags(cleaned);}
if(typeof _options.ellipsis==='number'&&_options.ellipsis>0){cleaned=basicEllipsis(cleaned,_options.ellipsis);}
if(_options.escape){cleaned=_.escape(cleaned);}
return cleaned;}}
function initYouTubeModals(options){if(SOE.MediaModal&&!globs.wdl.wdlCookDNT){if(options.usePlaylist!==false){options.videos.sort(function(a,b){if(a.priority===b.priority){return b.timestamp.getTime()-a.timestamp.getTime();}else{return b.priority-a.priority;}});$(document).on('click',options.selector,function(e){if(SOE.MediaModal.isReady()&&$(window).width()>=1024){e.preventDefault();SOE.MediaModal.showYouTube({videos:options.videos,videoId:this.getAttribute('data-video-id')});}});}else{SOE.MediaModal.setupYouTube({linkSelector:options.selector});}}}
function changeFilter(newFilter,newUrl){if(newFilter===SOE.Feeds.filter){return;}
SOE.Feeds.filter=(newFilter!==FEED_FILTER_ALL)?newFilter:null;if(SOE.Feeds.baseSegment.length>0&&window.history.replaceState&&window.location.pathname.indexOf(`${ SOE.Feeds.siteBaseSegment }/${ SOE.Feeds.baseSegment }`)===0){window.history.replaceState(null,document.title,newUrl);}
$('.feed-filters li').removeClass('active').filter(`[data-filter="${ newFilter }"]`).addClass('active');config.$container.attr('data-filter',newFilter);renderer.render(config);updateLoadMoreButton(renderer.hasMore(config));DTKR.trackEvent({eventCategory:'feed',eventAction:'filter',eventLabel:newFilter});DTKR.trackGA4Event('change_feed_filter',{filter:newFilter});}
function shareTotalTemplateProxy(shareCountWrapper){var shareCounts=shareCountWrapper.shareCounts;var shareTotal=0;if(shareCounts&&typeof(shareCounts)==='object'){if(shareCounts.Facebook&&typeof(shareCounts.Facebook)==='object'&&typeof(shareCounts.Facebook.share_count)==='number'){shareTotal+=shareCounts.Facebook.share_count;}
if(shareCounts.Twitter&&typeof(shareCounts.Twitter)==='number'){shareTotal+=shareCounts.Twitter;}}
return shareTotalTemplate({shareTotal:shareTotal});}
if(!globs.wdl.unitTest){$(document).ready(function(){checkQueue();$(`li[data-filter="${ SOE.Feeds.filter || FEED_FILTER_ALL }"]`).addClass('active');config.$container.attr('data-filter',(SOE.Feeds.filter||FEED_FILTER_ALL));if(typeof SOE.Feeds.filterAffixFn==='function'){$('.feed-filters').constrainedAffix({contents:'.filter-bar',constraintBox:'.feed-container',marginTop:SOE.Feeds.filterAffixFn,marginBottom:0});$('.feed-filters').on('click','.filter-item',function(e){e.preventDefault();var feedTop=(config.$container.offset().top-($('.feed-filters').height()+SOE.Feeds.filterAffixFn()));if(feedTop<$(window).scrollTop()){$('html, body').animate({scrollTop:feedTop},'fast');}});}
$('.feed-filters').on('click','.filter-item',function(e){e.preventDefault();changeFilter(this.getAttribute('data-filter'),$('.filter-link',this).attr('href'));});$('#feedLoadMore').on('click',function(e){e.preventDefault();var previousPageYOffset=window.pageYOffset;renderer.loadMore(config);updateLoadMoreButton(renderer.hasMore(config));$('html, body').scrollTop(previousPageYOffset);DTKR.trackEvent({eventCategory:'feed',eventAction:'click',eventLabel:'load more'});DTKR.trackGA4Event('load_more_feed');});if(SOE.MediaModal){SOE.MediaModal.setDotCount(10);}});}
return{setRenderer:setRenderer,newFeed:newFeed,newAsyncFeed:newAsyncFeed,sharerTemplate:sharerTemplate,shareTotalTemplate:shareTotalTemplateProxy,basicEllipsis:basicEllipsis,cleanText:cleanText,initYouTubeModals:initYouTubeModals,stickyLevels:FEED_STICKY_LEVELS,FEED_FILTER_ALL:FEED_FILTER_ALL,FEED_FILTER_ANY:FEED_FILTER_ANY};}());

/* end /web-platform/scripts/web-platform/component/feed/feed.js*/

/* start /web-platform/scripts/web-platform/component/feed/news.js*/
(function(data,externals,ducsOptions){'use strict';const options=ducsOptions;options.template=_.template($(SOE.Feeds.templateOverrides.news||'#newsFeed').html());options.type='news';options.column='alpha';options.clean=function(entry){if(entry.subtypeArray.indexOf('no-feed')>=0){return false;}
const obj=entry;obj.className='news';obj.timestamp=new Date(parseInt(entry.start_date_epoch,10)*1000);obj.summary=SOE.Feed.cleanText(obj.summary);obj.label=SOE.Feed.cleanText(obj.label);obj.isExternal=Boolean(obj.link);obj.link=obj.link||`${ SOE.Feeds.siteBaseSegment }/${ ducsOptions.filterType }/${ entry.pageName }`;obj.shareUrl=obj.isExternal?obj.link:`${ window.location.origin }${ obj.link }`;obj.shareType=obj.isExternal?'feed_linkout_item':'feed_news_item';obj.poster=obj.poster||obj.image;obj.thumb=obj.thumbnail||obj.thumb;obj.defaultImage=options.defaultImage;obj.isDgcContent=(obj.subtypeArray.indexOf('soe-content')>=0||obj.subtypeArray.indexOf('dgc-content')>=0);obj.shareCounts=obj.shareCounts||null;if(obj.subtypeArray.indexOf('sticky')>=0){obj.priority=SOE.Feed.stickyLevels.CONTENT;}
if(obj.subtypeArray.indexOf('featured')>=0){obj.isFeatured=true;}
SOE.Feeds.news.userClean?.(obj);return obj;};SOE.Feed.newFeed(data.list.concat(externals.list),options);}(SOE.Feeds.news.data,SOE.Feeds.news.externals,SOE.Feeds.news.options));

/* end /web-platform/scripts/web-platform/component/feed/news.js*/

/* start /web-platform/scripts/web-platform/component/feed/guides.js*/
(function(data,ducsOptions){'use strict';const options=ducsOptions;options.template=_.template($(SOE.Feeds.templateOverrides.guides||'#newsFeed').html());options.type='guides';options.column='alpha';options.clean=function(entry){if(entry.subtypeArray.indexOf('no-feed')>=0){return false;}
const obj=entry;obj.className='guide';obj.timestamp=new Date(parseInt(entry.start_date_epoch,10)*1000);obj.summary=SOE.Feed.cleanText(obj.summary);obj.label=SOE.Feed.cleanText(obj.label);obj.isExternal=false;obj.link=`${ SOE.Feeds.siteBaseSegment }/${ ducsOptions.filterType }/${ entry.pageName }`;obj.shareUrl=`${ window.location.origin }${ obj.link }`;obj.shareType='feed_guide_item';obj.defaultImage=options.defaultImage;obj.isDgcContent=(obj.subtypeArray.indexOf('dgc-content')>=0);obj.shareCounts=obj.shareCounts||null;if(obj.subtypeArray.indexOf('sticky')>=0){obj.priority=SOE.Feed.stickyLevels.CONTENT;}
if(obj.subtypeArray.indexOf('featured')>=0){obj.isFeatured=true;}
SOE.Feeds.guides.userClean?.(obj);return obj;};SOE.Feed.newFeed(data.list,options);}(SOE.Feeds.guides.data,SOE.Feeds.guides.options));

/* end /web-platform/scripts/web-platform/component/feed/guides.js*/

/* start /web-platform/scripts/web-platform/component/feed/update-notes.js*/
(function(data,ducsOptions){'use strict';var options=ducsOptions;options.template=_.template($(SOE.Feeds.templateOverrides.updateNotes||'#newsFeed').html());options.type='update-notes';options.column='alpha';options.clean=function(entry){const obj=entry;obj.className='update-notes';obj.timestamp=new Date(parseInt(entry.start_date_epoch,10)*1000);obj.summary=SOE.Feed.cleanText(obj.summary);obj.label=SOE.Feed.cleanText(obj.label);obj.isExternal=false;obj.link=`${ SOE.Feeds.siteBaseSegment }/${ ducsOptions.filterType }/${ entry.pageName }`;obj.shareUrl=`${ window.location.origin }${ obj.link }`;obj.shareType='feed_update_notes_item';obj.defaultImage=options.defaultImage;obj.isDgcContent=false;obj.shareCounts=obj.shareCounts||null;if(obj.subtypeArray.indexOf('sticky')>=0){obj.priority=SOE.Feed.stickyLevels.CONTENT;}
if(obj.subtypeArray.indexOf('featured')>=0){obj.isFeatured=true;}
SOE.Feeds.updateNotes.userClean?.(obj);return obj;};SOE.Feed.newFeed(data.list,options);}(SOE.Feeds.updateNotes.data,SOE.Feeds.updateNotes.options));

/* end /web-platform/scripts/web-platform/component/feed/update-notes.js*/

/* start /web-platform/scripts/web-platform/component/feed/youtube.js*/
(function(data,options){'use strict';const allVideos=[];options.template=_.template($(SOE.Feeds.templateOverrides.youtube||'#youtubeFeed').html());options.type='youtube';options.column='alpha';options.clean=function(entry){const obj={};obj.className='youtube';obj.timestamp=new Date(parseInt(entry.start_date_epoch,10)*1000);obj.isExternal=true;obj.title=entry.title;obj.image=entry.thumb;obj.link=`https://youtube.com/watch?v=${ entry['query-string'] }&autoplay=1`;obj.shareUrl=`https://youtube.com/watch?v=${ entry['query-string'] }`;obj.shareType='feed_youtube_item';obj.id=entry['query-string'];obj.username=_.escape(entry['channel-name']);obj.channelId=entry['channel-id'];obj.shareCounts=entry.shareCounts||null;obj.isDgcContent=options.officialChannels?(options.officialChannels.indexOf(obj.channelId)>=0):false;if(entry.sticky==='true'){obj.priority=SOE.Feed.stickyLevels.CONTENT;}
SOE.Feeds.youtube.userClean?.(obj);allVideos.push(obj);return obj;};if(typeof data!=='undefined'&&data instanceof Array){SOE.Feed.newFeed(data,options);}
SOE.Feed.initYouTubeModals({selector:'#feedContainer .youtube a[data-video-id]',usePlaylist:options.usePlaylist,videos:allVideos});}(SOE.Feeds.youtube.data,SOE.Feeds.youtube.options));

/* end /web-platform/scripts/web-platform/component/feed/youtube.js*/
